package com.alipay.controller;

import com.alipay.api.AlipayApiException;
import com.alipay.pay.PayUtile;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Controller
public class PatController {
    /**
     * 当面付的支付
     * @param httpResponse
     * @throws AlipayApiException
     * @throws IOException
     */
    @GetMapping("/geta")
    public void alipat(  HttpServletResponse httpResponse) throws AlipayApiException, IOException {
        PayUtile.getPay(httpResponse,"520sada6155",52.0,"测试支付",50);
        System.out.println(PayUtile.getPaymentSuccess("fe346d97912a46298ef115b0be447903"));
    }
}
